/* const express = require('express')
const app = express()
const bodyParser = require('body-parser')


app.use(bodyParser.urlencoded({extended:false}))
app.use(bodyParser.json())

app.post("/form", (req, res) => {
    console.log(req.body);
    res.send(req.body);
  });
  
  app.get("/home", (req, res) => {
    res.send({ name: "home", msg: "express" });
  });
  
  app.listen(8080, () => {
    console.log("8080 running");
  }); */

  const express = require('express')
  const app = express()
  const bodyParser = require('body-parser')

  app.use(bodyParser.urlencoded({extended:false}))
  app.use(bodyParser.json())

  app.post('/form',(req,res)=>{
      console.log(req.body);
      res.send(req.body)
  })

  app.get('/home',(req,res)=>{
      res.send('express get')
  })

  app.listen(8080,()=>{
      console.log('8080 running')
  })
